home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 1998 May / PCPlus May 1998=disk A.iso / CPLUS45 / BC45 / OWLSRC.PAK / PAINTDC.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1995-08-29  |  553 b   |  25 lines

  1. //----------------------------------------------------------------------------
  2. // ObjectWindows
  3. // (C) Copyright 1992, 1994 by Borland International, All Rights Reserved
  4. //
  5. //   Implementation of TPaintDC
  6. //----------------------------------------------------------------------------
  7. #include <owl/owlpch.h>
  8. #include <owl/dc.h>
  9.  
  10. TPaintDC::TPaintDC(HWND wnd)
  11. :
  12.   TDC()
  13. {
  14.   Wnd = wnd;
  15.   Handle = ::BeginPaint(Wnd, &Ps);
  16.   CheckValid();
  17. }
  18.  
  19. TPaintDC::~TPaintDC()
  20. {
  21.   RestoreObjects();
  22.   if (ShouldDelete)
  23.     ::EndPaint(Wnd, &Ps);
  24. }
  25.